<!DOCTYPE HTML>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta charset="utf-8"/>
	<link href="../css/self/mTable.css" type="text/css" rel="stylesheet"/>
</head>

<body>
<div class="row bg-light	">
	<div class="col-lg-4 col-sm-12 breadcrumb bg-light">
		<li class="breadcrumb-item">基础服务功能</li>
		<li class="breadcrumb-item"><a data-load-page="serviceList" href="#">服务集群管理</a></li>
		<li class="breadcrumb-item"><span id="servName"></span> </li>
	</div>
	<div class="col-lg-8 col-sm-12">
		<div class="form-inline mt-md-0 mr-2 pt-1 float-right" >
			<input id= "S_QUEUE_NAME" class="form-control mr-sm-2" type="text" placeholder="请输入队列名称" >
			<div class="input-group">
				<select class="custom-select" id="S_QUEUE_TYPE">
					<option selected value = "">服务类型（默认所有）</option>
					<option value ="1">Queue（ 队列 ）</option>
					<option value ="2">Topic（ 广播 ）</option>
				</select>
				<div class="input-group-append">
					<button class="btn btn-outline-success" onclick="searchQueues();">
						<i class="iconfont ibsp-chaxun mr-1"></i>搜索
					</button>
				</div>
			</div>
		</div>
		<div class="btn-group float-left my-sm-1 mr-5">
			<button class="btn btn-outline-primary" onclick="addQueue();">新增队列</button>
			<button class="btn btn-outline-danger" onclick="delQueue();">删除队列</button>
		</div>
	</div>
</div>

<div class="row-fluid" style="margin-top:10px">
	<table id="queue_list">
	</table>
</div>


<div class="modal fade" id="newQueue" tabindex="-1" role="dialog" aria-labelledby="newServiceHeader" aria-hidden="true">
	<div class="modal-dialog" role="document">
		<div class="modal-content">
			<div class="modal-header">
				<h5 class="modal-title" id="newQueueHeader">新增队列 title</h5>
				<button type="button" class="close" data-dismiss="modal" aria-label="Close">
					<span aria-hidden="true">×</span>
				</button>
			</div>

			<div class="modal-body">
				<div class="tab-pane active in" id="home">
					<form id="newQueueForm" class="form-horizontal">
						<input type="hidden" value="" name="QUEUE_ID" id="QUEUE_ID"/>
						<input type="hidden" value="" name="SERV_ID" id="SERV_ID"/>
						<div class="form-group row ">
							<label for="QUEUE_NAME" class="col-sm-4 control-label form-control-label">Queue/Topic名称：</label>
							<div class="col-sm-8">
								<input type="text" class="form-control" name="QUEUE_NAME" id="QUEUE_NAME" placeholder="请输入Queue/Topic名称">
							</div>
						</div>
						<div class="form-group row">
							<label for="QUEUE_TYPE" class="col-sm-4 control-label form-control-label">类型：</label>
							<div class="col-sm-8">
								<select class="custom-select" name="QUEUE_TYPE" id="QUEUE_TYPE">
									<option value ="1" selected>队列</option>
									<option value ="2">广播</option>
								</select>
							</div>
						</div>
						<div class="form-group row">
							<label class="col-sm-4 control-label form-control-label">是否持久化：</label>
							<div class="col-sm-8">
								<div class="form-check mt-3 form-check-inline">
									<input class="form-check-input " type="radio" name="IS_DURABLE" value="0">
									<label class="form-check-label " >否</label>
								</div>
								<div class="form-check mt-3 form-check-inline">
									<input class="form-check-input" type="radio" name="IS_DURABLE" value="1">
									<label class="form-check-label" >是</label>
								</div>
							</div>
						</div>
						<div class="form-group row">
							<label class="col-sm-4 control-label form-control-label">是否全局有序：</label>
							<div class="col-sm-8">
								<div class="form-check mt-3 form-check-inline">
									<input class="form-check-input " type="radio" name="IS_ORDERED" value="0">
									<label class="form-check-label " >否</label>
								</div>
								<div class="form-check mt-3 form-check-inline">
									<input class="form-check-input" type="radio" name="IS_ORDERED" value="1">
									<label class="form-check-label" >是</label>
								</div>
							</div>
						</div>
						<div class="form-group row">
							<label class="col-sm-4 control-label form-control-label">是否优先级队列：</label>
							<div class="col-sm-8">
								<div class="form-check mt-3 form-check-inline">
									<input class="form-check-input " type="radio" name="IS_PRIORITY" value="0">
									<label class="form-check-label " >否</label>
								</div>
								<div class="form-check mt-3 form-check-inline">
									<input class="form-check-input" type="radio" name="IS_PRIORITY" value="1">
									<label class="form-check-label" >是</label>
								</div>
							</div>
						</div>

						<!--<div class="form-group row">
							<label class="col-sm-4 control-label form-control-label">队列类型</label>
							<div class="col-sm-8">
								<div class="form-check mt-3 form-check-inline">
									<input class="form-check-input" type="radio" name="inlineRadioOptions" value="option1">
									<label class="form-check-label" >Queue</label>
								</div>
								<div class="form-check mt-3 form-check-inline">
									<input class="form-check-input " type="radio" name="inlineRadioOptions" value="option2">
									<label class="form-check-label " >Topic</label>
								</div>
							</div>
						</div>-->

					</form>
				</div>
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-outline-secondary" data-dismiss="modal">关闭</button>
				<button type="button" onclick="saveQueue()" class="btn btn-primary ">提交</button>
			</div>
		</div>
	</div>

</div>
</body>
<script type="text/javascript" src="../js/queue.js"></script>
<script type="text/javascript">
	$(".breadcrumb>li>a").off("click").on("click",function(){
		var $this = $(this), pageName = $this.data("load-page"),$main = $("#mainContent");
		if(pageName != ""){
			/*$main.load("pages/"+pageName+".html");*/
			$(".contextMenu").remove();
			$main.load(pageName+".html",function(){
				initPage();
			});
		}
	});
</script>
</html>
